package com.eregg.learn.netty.demo.pipeline.handler;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;

public class ServerOutHandlerC extends ChannelOutboundHandlerAdapter {
    @Override
    public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
        System.out.println("ServerOutHandlerC");
        ByteBuf buffer = (ByteBuf) msg;
        buffer.writeBytes(" -> outboundC".getBytes());

        super.write(ctx, buffer, promise);
    }
}
